/**
 *  *2010-8-7 上午12:05:28  add 
 */
package com.base.myproject.client.ui.test;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;

/**
 * @author Administrator
 *2010-8-7
 * javazgw@gmail.com
 */
public class UIbindertest extends Composite {

	private static UIbindertestUiBinder uiBinder = GWT
			.create(UIbindertestUiBinder.class);

	interface UIbindertestUiBinder extends UiBinder<Widget, UIbindertest> {
	}

	@UiField
	Button button;

	public UIbindertest(String firstName) {
		initWidget(uiBinder.createAndBindUi(this));

		// Can access @UiField after calling createAndBindUi
		button.setText(firstName);
	}

	@UiHandler("button")
	void onClick(ClickEvent e) {
		Window.alert("Hello!");
	}

}
